/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dp1.titandevelop.titano.view.logist;

import dp1.titandevelop.titano.bean.Estado;
import dp1.titandevelop.titano.bean.Mensajes;
import dp1.titandevelop.titano.persistent.OrdenProduccion;
import dp1.titandevelop.titano.persistent.Requerimiento;
import dp1.titandevelop.titano.persistent.RequerimientoXProducto;
import dp1.titandevelop.titano.service.OrdenProduccionService;
import dp1.titandevelop.titano.service.RequerimientoService;
import dp1.titandevelop.titano.service.RequerimientoXProductoService;
import dp1.titandevelop.titano.service.ValidacionService;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import javax.imageio.ImageIO;
import javax.swing.JOptionPane;
import javax.swing.table.AbstractTableModel;
import org.apache.cayenne.exp.Expression;
import org.apache.cayenne.exp.ExpressionFactory;

/**
 *
 * @author chrestean
 */
public class AdministrarRequerimientoCompra extends javax.swing.JInternalFrame {

    public void RefreshTable() {
        AbstractTableModel aux = (AbstractTableModel) this.jTable1.getModel();
        aux.fireTableDataChanged();
    }
//    private BufferedImage imgFondo;
//    @Override
//    protected void paintComponent(Graphics g) {
//
//
//        if (isOpaque()) {
//            g.setColor(getBackground());
//            g.fillRect(0, 0, getWidth(), getHeight());
//        }
//        if (this.imgFondo != null) {
//            g.drawImage(imgFondo, 0, 0, this);
//        }
//    }
    private ArrayList<Requerimiento> listaRequerimiento;
    private AbstractTableModel model = new AbstractTableModel() {
        @Override
        public int getRowCount() {
            return listaRequerimiento.size();
        }

        @Override
        public int getColumnCount() {
            return 5;
        }

        @Override
        public Object getValueAt(int fi, int co) {
            switch (co) {
                case 0:  // id requerimiento
                    return listaRequerimiento.get(fi).getIdrequerimiento();
                case 1: // Orden produccion
                    if (listaRequerimiento.get(fi).getToOrdenProduccion().getIdordenproduccion() != 0) {
                        return listaRequerimiento.get(fi).getToOrdenProduccion().getIdordenproduccion();
                    } else {
                        return "Ninguna";
                    }
                case 2: // fecha de registro
                    return new SimpleDateFormat("dd-MM-yyyy").format(listaRequerimiento.get(fi).getFecharegistro());
                case 3: // fecha de lim
                    return new SimpleDateFormat("dd-MM-yyyy").format(listaRequerimiento.get(fi).getFecha());

                case 4: // estado
                    return Estado.devuelveCadena(listaRequerimiento.get(fi).getEstado());
            }
            return null;

        }

        @Override
        public String getColumnName(int col) {
            String[] titles = {"Id Requerimiento", "Orden de Produccion", "Fecha de Registro", "Fecha Límite", "Estado"};
            return titles[col];
        }
    };

    public AdministrarRequerimientoCompra() {
        initComponents();
        this.jTable1.setModel(this.model);
        this.btnDetalle.setEnabled(false);
        this.jButton2.setEnabled(false);
        this.listaRequerimiento = new ArrayList<Requerimiento>();

        this.cmbEstado.addItem(Estado.devuelveCadena(1));
        this.cmbEstado.addItem(Estado.devuelveCadena(2));
        this.cmbEstado.addItem(Estado.devuelveCadena(3));
        this.cmbEstado.addItem(Estado.devuelveCadena(4));

        ValidacionService vs = new ValidacionService();
        vs.SNumeros(txtOProduccion);
        vs.SNumeros(this.txtIDRequerimiento);
        vs.NoEscribe(dpFechaReg);
        vs.NoEscribe(this.datePkFechaLim);

//        try {
//            //this.getClass().getResource("/img/fondo.png").toURI();
//            this.imgFondo = ImageIO.read(getClass().getResourceAsStream("/img/fondo.png"));
//        } catch (IOException ex) {
//            ex.printStackTrace();
//        }

//     Dimension tamEscritorio = this.getParent().getSize();
//     Dimension tamInternalFrame = this.getSize();
//     this.setLocation((tamEscritorio.width - tamInternalFrame.width)/2,
//    (tamEscritorio.height- tamInternalFrame.height)/2);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        txtOProduccion = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        txtIDRequerimiento = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        cmbEstado = new javax.swing.JComboBox();
        datePkFechaLim = new org.jdesktop.swingx.JXDatePicker();
        dpFechaReg = new org.jdesktop.swingx.JXDatePicker();
        jLabel1 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        btnBuscar = new javax.swing.JButton();
        btnNuevo = new javax.swing.JButton();
        btnLimpiar = new javax.swing.JButton();
        btnSalir = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        btnDetalle = new javax.swing.JButton();

        setTitle("Administrar Requerimiento de Compra");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Filtros de Búsqueda"));
        jPanel1.setFont(new java.awt.Font("Tekton Pro", 0, 11)); // NOI18N

        jLabel9.setText("Orden Produccion");

        txtOProduccion.setFont(new java.awt.Font("Tekton Pro", 0, 11)); // NOI18N

        jLabel11.setText("Id Requerimiento");

        txtIDRequerimiento.setFont(new java.awt.Font("Tekton Pro", 0, 11)); // NOI18N

        jLabel13.setText("Fecha  Límite");

        jLabel14.setText("Estado");

        cmbEstado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccionar" }));

        dpFechaReg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dpFechaRegActionPerformed(evt);
            }
        });

        jLabel1.setText("Fecha de Registro");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel13)
                    .addComponent(jLabel11)
                    .addComponent(jLabel9))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtIDRequerimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtOProduccion, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(datePkFechaLim, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(39, 39, 39)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel14))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cmbEstado, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(dpFechaReg, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
                .addGap(8, 8, 8))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addComponent(jLabel1)
                        .addGap(15, 15, 15)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel14)
                            .addComponent(cmbEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9)
                            .addComponent(txtOProduccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(dpFechaReg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(15, 15, 15)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel11)
                            .addComponent(txtIDRequerimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(15, 15, 15)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(datePkFechaLim, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(8, 8, 8))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Resultado de Búsqueda"));
        jPanel2.setFont(new java.awt.Font("Tekton Pro", 0, 11)); // NOI18N

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Orden Produccion", "ID Requerimiento", "Id Producto", "Producto", "Fecha Requerimiento", "Estado"
            }
        ));
        jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable1MouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTable1);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 528, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        btnBuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/buscar.png"))); // NOI18N
        btnBuscar.setToolTipText("Buscar");
        btnBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarActionPerformed(evt);
            }
        });

        btnNuevo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/nuevo.png"))); // NOI18N
        btnNuevo.setToolTipText("Nuevo");
        btnNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevoActionPerformed(evt);
            }
        });

        btnLimpiar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/limpiar.png"))); // NOI18N
        btnLimpiar.setToolTipText("Limpiar");
        btnLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLimpiarActionPerformed(evt);
            }
        });

        btnSalir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/retroceder.png"))); // NOI18N
        btnSalir.setToolTipText("Salir");
        btnSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalirActionPerformed(evt);
            }
        });

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/eliminar.png"))); // NOI18N
        jButton2.setEnabled(false);
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        btnDetalle.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/detalle.png"))); // NOI18N
        btnDetalle.setToolTipText("Detalle");
        btnDetalle.setEnabled(false);
        btnDetalle.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDetalleActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addComponent(btnBuscar)
                .addGap(1, 1, 1)
                .addComponent(btnNuevo)
                .addGap(1, 1, 1)
                .addComponent(btnLimpiar)
                .addGap(0, 0, 0)
                .addComponent(btnSalir)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnDetalle)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton2)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnDetalle)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnBuscar)
                            .addComponent(btnNuevo)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(btnLimpiar)
                                .addComponent(btnSalir)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(8, 8, 8)
                        .addComponent(jButton2)))
                .addGap(8, 8, 8))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevoActionPerformed

        //  ModulosT_LOG_NuevoRequerimientoCompra admARCNew = new ModulosT_LOG_NuevoRequerimientoCompra(this);
        OrdenProduccionService ops = new OrdenProduccionService();
        OrdenProduccion op = ops.buscarActivo();
        if (op == null) {
            JOptionPane.showMessageDialog(this, "En este momento no existe Orden de Producción alguna que se encuentre activa.", "Aviso!", JOptionPane.WARNING_MESSAGE);
            //return;
        } else {
//        Requerimi NuevoRequerimientoCompra admARCNew = new NuevoRequerimientoCompra(this);entoService rs = new RequerimientoService();
//        if (rs.buscarPorOrdenProduccion(op) != null) {
//            JOptionPane.showMessageDialog(this, "La orden de produccion activa ya tiene un requerimiento asignado.", "Orden de Producción", JOptionPane.ERROR_MESSAGE);
//            return;
//        }
            RequerimientoService rs = new RequerimientoService();
            Requerimiento req = rs.buscarActivo();
            if (req != null) {
                JOptionPane.showMessageDialog(this, "Ya existe un requerimiento pendiente para esta orden de producción.", "Aviso!", JOptionPane.WARNING_MESSAGE);
            } else {
                NuevoRequerimientoCompra admARCNew = new NuevoRequerimientoCompra(this);
                Dimension desktopSize = this.getParent().getSize();
                Dimension jInternalFrameSize = admARCNew.getSize();
                admARCNew.setLocation((desktopSize.width - jInternalFrameSize.width) / 2,
                        (desktopSize.height - jInternalFrameSize.height) / 4);
                this.getParent().add(admARCNew);
                admARCNew.show();
                this.hide();
            }
        }
    }//GEN-LAST:event_btnNuevoActionPerformed

    private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
        // TODO add your handling code here:
        RequerimientoService rs = new RequerimientoService();
        if (this.txtIDRequerimiento.getText().equals("")
                && this.txtOProduccion.getText().equals("")
                && this.datePkFechaLim.getDate() == null
                && this.dpFechaReg.getDate() == null) {
            this.listaRequerimiento = rs.buscarTodo();
        } else {
            int idReq = 0, idOC = 0;
            if (!this.txtIDRequerimiento.getText().equals("")) {
                idReq = Integer.parseInt(this.txtIDRequerimiento.getText());
            }

            if (!this.txtOProduccion.getText().equals("")) {
                idOC = Integer.parseInt(this.txtOProduccion.getText());
            }

            this.listaRequerimiento = rs.buscarPor(idReq, idOC, this.dpFechaReg.getDate(), this.datePkFechaLim.getDate());
        }
        this.model.fireTableDataChanged();

    }//GEN-LAST:event_btnBuscarActionPerformed

    private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable1MouseClicked
        // TODO add your handling code here:
        this.btnDetalle.setEnabled(true);
        this.jButton2.setEnabled(true);


    }//GEN-LAST:event_jTable1MouseClicked

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        RequerimientoService rs = new RequerimientoService();
        Mensajes m = new Mensajes();
         if (JOptionPane.OK_OPTION == JOptionPane.showInternalConfirmDialog(this.getRootPane(),m.getPregEliminar(),"Aviso!",JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE)) {
            rs.borrarPorId(this.listaRequerimiento.get(this.jTable1.getSelectedRow()).getIdrequerimiento());
            this.listaRequerimiento.remove(this.jTable1.getSelectedRow());
         }
        btnBuscarActionPerformed(null);
        this.model.fireTableDataChanged();

    }//GEN-LAST:event_jButton2ActionPerformed

    private void btnLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLimpiarActionPerformed
        // TODO add your handling code here:
        this.txtIDRequerimiento.setText("");
        this.txtOProduccion.setText("");
        this.datePkFechaLim.setDate(null);
        this.dpFechaReg.setDate(null);
        this.cmbEstado.setSelectedIndex(0);
        this.listaRequerimiento.clear();
        this.RefreshTable();

        this.listaRequerimiento.clear();
        this.model.fireTableDataChanged();


    }//GEN-LAST:event_btnLimpiarActionPerformed

    private void btnSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalirActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_btnSalirActionPerformed

    private void dpFechaRegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dpFechaRegActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_dpFechaRegActionPerformed

    private void btnDetalleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDetalleActionPerformed

        //Instancio la ventana
        int index = this.jTable1.getSelectedRow();
        ModulosT_LOG_DetalleRequerimientoCompra ventanaDetalle = new ModulosT_LOG_DetalleRequerimientoCompra(this.listaRequerimiento.get(index));
        this.getParent().add(ventanaDetalle);

        Dimension desktopSize = this.getParent().getSize();
        Dimension jInternalFrameSize = ventanaDetalle.getSize();
        ventanaDetalle.setLocation((desktopSize.width - jInternalFrameSize.width) / 2, (desktopSize.height - jInternalFrameSize.height) / 4);
        ventanaDetalle.show();
    }//GEN-LAST:event_btnDetalleActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnDetalle;
    private javax.swing.JButton btnLimpiar;
    private javax.swing.JButton btnNuevo;
    private javax.swing.JButton btnSalir;
    private javax.swing.JComboBox cmbEstado;
    private org.jdesktop.swingx.JXDatePicker datePkFechaLim;
    private org.jdesktop.swingx.JXDatePicker dpFechaReg;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField txtIDRequerimiento;
    private javax.swing.JTextField txtOProduccion;
    // End of variables declaration//GEN-END:variables

    private void setLocationRelativeTo(Object object) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    private Object getparent() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}
